ESENTUTL Utility
The ESENTUTL utility (Esentutl.exe) is a command-line utility from Microsoft used for database maintenance and recovery operations.
There are versions applicable to each type of operating system and you must use the version that matches your database. Currently, the only CygNet ESE database that has both 32- and 64-bit versions is the VHS.
The Esentutl.exe tool is located in the Windows\System32 folder (on a 64-bit operating system) and in the Windows\SysWOW64 folder (on a 32-bit operating system). 
Note: Be advised that if a CygNet utility has been provided for a particular purpose then use that utility and do not use ESENTUTL. For example, use DBS Restore Backup instead of the Recovery option of ESENTUTL.
Consult Microsoft documentation for more information about this utility and its full list of options.
The ESENTUTL contains the following options:
Type esentutl at the command prompt for a full list of options.
Defragmentation
This option performs off-line compaction of the database on .dat.edb files. Defragmentation is recommended to help improve performance. This option requires that the DBS-based service be stopped.
Syntax
esentutl /d <database file name> [options]
Recommended Options
| Option | Definition |
|---|---|
|
/b <database file name> |
Creates a backup copy of the database prior to defragmentation using the specified file name. |
|
/p |
Saves the defragmented database under the temporary file name. |
|
/t <database file name> |
Sets the name of the temporary database file. Default is TEMPDFRG*.edb. |
Example
The following example defragments the ELS database and saves the new defragmented file with the name els.dat.edb.new.
|
esentutl /d els.dat.edb /t els.dat.edb.new /p |
Recovery
CygNet recommends that you use the DBS Restore Backup utility rather than this option.
The option performs a soft recovery to overcome database errors by bringing the database to a consistent state. ESENTUTL rebuilds the database using the transaction log files. Recovery is recommended when you need to perform a soft database recovery. This option requires that the DBS-based service be stopped.
Note: Use DBS Restore Backup for a hard recovery.
Integrity
This option verifies that the database is in an operational state and doesn’t contain any structural errors. It is used on service .dat.edb and .inx.edb files. This option requires that the DBS-based service be stopped.
Note: An Integrity check does not run database recovery. If a database is in a "Dirty Shutdown" state it is strongly recommended that before proceeding with an integrity check, Recovery (/r) is first run to properly complete database operations for the previous shutdown.
Syntax
esentutl /g <database name> [options]
Recommended Options
| Option | Definition |
|---|---|
|
/t<db> |
Defines the temporary database name. |
|
/f<name> |
Set a prefix to use for name of report files. |
Checksum
This option verifies the checksum of each page of the database. It is used on service .dat.edb and .inx.edb files. This option requires that the DBS-based service be stopped.
Note: A Checksum operation does not run database recovery.
Syntax
esentutl /k <file name> [options]
Recommended Options
| Option | Definition |
|---|---|
|
/t<db> |
Defines the temporary database name. |
Repair
This option repairs a damaged or corrupted database file. Run it after a Recovery (/r) to ensure the database is in a consistent state. This option does not apply data from transaction log files to the database. It may result in loss of data. The option is used on service .dat.edb files. Repair is recommended when you need to manually repair a database. This option requires that the DBS-based service be stopped.
Note: CygNet Software recommends restoring from a backup (with DBS Restore Backup Utility) over running a Repair operation, as a Repair does not necessarily leave the database in a “CygNet-consistent” manner. If you don’t have a backup and you need to run the Repair option, run File Check ESE and ReIndex ESE.
Syntax
esentutl /p <database name> [options]
Recommended Options
| Option | Definition |
|---|---|
|
/t<db> |
Defines the temporary database name. |
|
/f<name> |
Set a prefix to use for name of report files. |
|
/g |
Run an integrity check before repairing. |
File Dump
This option dumps database, system, or log file information to the screen and optionally to a file. File Dump is useful for troubleshooting, for example, when you want to check shutdown state or to check log file information. This option requires that the DBS-based service be stopped.
Syntax
esentutl /m[mode-modifier] <file name> [options]
Mode Modifiers
An optional letter designating the type of file dump to perform. Note that there is no space between m and the mode-modifier.
| Modifier | Definition |
|---|---|
|
h |
Dump database header (default) |
|
k |
Dump checkpoint file |
|
l |
Dump log file or set of logs |
|
m |
Dump meta-data |
|
s |
Dump space usage |
|
u |
Dump undefined codepoint fixup table |
File Name
The name of the file to dump. The type of the specified file must match the dump type being requested. For example, if using /mh then <file name> must be the name of a database.
Recommended Options
| Option | Definition |
|---|---|
|
/t<table> |
Performs a database dump for a specified table only. |
|
/v |
Provide verbose output. |
Copy File
This option copies a database or log file to a secondary location. This option requires that the DBS-based service be stopped.
Syntax
esentutl /y <source file> [options]
Recommended Options
| Option | Definition |
|---|---|
|
/d <directory name> |
The directory name where you want to copy the file. |


